﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Classes {
    import flash.display.*;
    import com.greensock.*;

    public class TourBus extends Vehicle {

        protected var m_busFull:Boolean = true;
        protected var m_fullImage:DisplayObject = null;

        public function TourBus(_arg1:String, _arg2:Boolean){
            super(_arg1, _arg2);
        }
        public function set full(_arg1:Boolean):void{
            if (((this.m_fullImage) && (!(_arg1)))){
                TweenLite.to(this.m_fullImage, 0.5, {alpha:0});
            };
            this.m_busFull = _arg1;
        }
        override protected function getCurrentImage():ItemImageInstance{
            var _local1:String = animation;
            var _local2:ItemImageInstance = m_item.getCachedImage("bus_full", this, m_direction);
            var _local3:ItemImageInstance = m_item.getCachedImage(_local1, this, m_direction);
            return (_local3);
        }
        override public function replaceContent(_arg1:DisplayObject):void{
            var _local4:DisplayObject;
            var _local5:Sprite;
            super.replaceContent(_arg1);
            var _local2:Number = 1;
            if (this.m_fullImage){
                _local2 = this.m_fullImage.alpha;
            };
            this.m_fullImage = null;
            var _local3:ItemImageInstance = m_item.getCachedImage("bus_full", this, m_direction);
            if (((_local3) && (this.m_busFull))){
                _local4 = (_local3.image as DisplayObject);
                if (_local4){
                    _local5 = (m_displayObject as Sprite);
                    _local5.addChild(_local4);
                    this.m_fullImage = _local4;
                    this.m_fullImage.alpha = alpha;
                };
                if (((!(this.m_busFull)) && ((alpha > 0)))){
                    this.m_busFull = true;
                    this.full = false;
                };
            };
        }

    }
}//package Classes 
